#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

int main()
{
  int fd;
  close(2);
  printf("HI\n");
  fd = open( "newfile.txt", O_WRONLY | O_CREAT | O_TRUNC, 0600 );
  printf("%d\n", fd);
  printf("WHAT?\n");
  fprintf(stderr, "I SAID ERROR\n");

  return 0;
}
